<{include file="admin:common/header.html"}>
<div class="page-title">
	<table width="100%" align="center" cellpadding="0" cellspacing="0" >
		<tr>
			<td width="30" align="right"><img src="<{$pager.url}>/images/main-h5-ico.gif" alt="" /></td>
			<th><{$MOD.title}></th>
			<td align="right">&nbsp;<{link ctl="article/item:create" class="button" priv="hide"}></td>
			<td width="15"></td>
		</tr>
	</table>
</div>
<div class="page-data">
	<table  width="100%" cellpadding="0" cellspacing="0" class="table-data form" >
		<tr>
			<th class="w-200 table-button-th">文章分类:</th>
			<td class="table-button-td">
				<select id="sel_class_id" val="<{$detail.class_id}>">
				<{foreach $class_tree as $v}>
				<option value="<{$v.class_id}>"<{if $v.class_id==$pager.PID}>selected="selected"<{/if}>><{$v.title}></option>
				<{foreach $v.children as $vv}>
				<option value="<{$vv.class_id}>"<{if $vv.class_id==$pager.PID}>selected="selected"<{/if}>>&nbsp;&nbsp;├─<{$vv.title}></option>
				<{foreach $vv.children as $vvv}>
				<option value="<{$vvv.class_id}>"<{if $vvv.class_id==$pager.PID}>selected="selected"<{/if}>>&nbsp;&nbsp;&nbsp;&nbsp;├─<{$vvv.title}></option>
				<{/foreach}>
				<{/foreach}>
				<{/foreach}>
				</select>				
			</td>
		</tr>
	</table>
	
	<form id="article-form">
	<table align="center" width="100%" cellpadding="0" cellspacing="0" class="table-data list">
		<tr>
			<th class="w-100">编号</th>
			<th>文章标题</th>
			<th class="w-100">分类</th>
			<th class="w-50">状态</th>
			<th class="w-50">排序</th>
			<th class="w-150">发布时间</th>
			<th class="w-180">操作</th>

		</tr>
		<{foreach $item_list as $item}>
		<tr id="remvoe-item-<{$item.itemId}>">
			<td class="left">
				<label><input type="checkbox" value="<{$item.itemId}>" name="itemId[]" CK="itemId" /><{$item.itemId}><label>
			</td>
			<td class="left"><{$item.title|cutstr:40:'...'}></td>
			<td><{$class_list[$item.class_id].title}></td>
			<td><{if $item.hidden}><font color="red">隐藏</font><{else}>显示<{/if}></td>
			<td><input type="text" name="orderby[<{$item.itemId}>]" value="<{$item.orderby}>" class="input w-50"/></td>
			<td><{$item.dateline|format}></td>
			<td class="left">
				<{link ctl="article/item:edit" args="<{$item.itemId}>" class="button" target="_blank" title="编辑"}>
				<{link ctl="article/item:delete" args="<{$item.itemId}>" class="button" priv="hide" act="mini:remove:item-<{$item.itemId}>" title="删除"}>
			</td>
			
		</tr>
		<{/foreach}>
	</table>
	</form>
	<div class="page-bar">
		<table>
			<tr>
			<td class="w-100"><label><input type="checkbox" CKA="itemId"/>&nbsp;&nbsp;全选</label></td>
			<td colspan="10" class="left">
				<{link ctl="article/item:delete" type="button" submit="mini:#article-form" confirm="mini:确定要批量删除选中的文章吗?" priv="hide" value="批量删除"}>
				<{link ctl="article/item:update" type="button" submit="mini:#article-form" priv="hide" value="更新排序"}>
			</td>
			<td class="page-list"><{$pager.pagebar}></td>
		</tr>
		</table>
	</div>
</div>
<script type="text/javascript">
(function(K, $){
$("#sel_class_id").on("change",function(){
	window.location.href = "?article/item-index-"+$(this).val()+"-1.html";
});
})(window.KT, window.jQuery);
</script>
<{include file="admin:common/footer.html"}>